/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.wider.foundation.concurrency;

/**
 * This interface defines a standard framework for implementing Runnable which able to be paused by the user.
 * @author William Choi <avextk@gmail.com>
 */
public interface Pausable {
    /**
     * Method for user to pause the implementing instance.
     * @return  True if succeeded, false otherwise.
     */
    public boolean pause();

    /**
     * Method for user to resume the paused instance.
     * @return  True if succeeded, false otherwise.
     */
    public boolean resume();

    /**
     * Check if the instance is paused or not.
     * @return  True if paused, false otherwise.
     */
    public boolean isPaused();
}
